Integrand size = 24, antiderivative size = 334 \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {2 a (e+f x) \arctan \left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {i a f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {i a f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}-\frac {b f \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2} \]
[Out]
Time = 0.39 (sec) , antiderivative size = 334, normalized size of antiderivative = 1.00, number of steps used = 19, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5692, 5680, 2221, 2317, 2438, 6874, 4265, 3799} \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {2 a (e+f x) \arctan \left (e^{c+d x}\right )}{d \left (a^2+b^2\right )}-\frac {i a f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{d^2 \left (a^2+b^2\right )}+\frac {i a f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{d^2 \left (a^2+b^2\right )}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{d^2 \left (a^2+b^2\right )}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{d^2 \left (a^2+b^2\right )}-\frac {b f \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d^2 \left (a^2+b^2\right )}+\frac {b (e+f x) \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}+1\right )}{d \left (a^2+b^2\right )}+\frac {b (e+f x) \log \left (\frac {b e^{c+d x}}{\sqrt {a^2+b^2}+a}+1\right )}{d \left (a^2+b^2\right )}-\frac {b (e+f x) \log \left (e^{2 (c+d x)}+1\right )}{d \left (a^2+b^2\right )} \]
[In]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 3799
Rule 4265
Rule 5680
Rule 5692
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \frac {\int (e+f x) \text {sech}(c+d x) (a-b \sinh (c+d x)) \, dx}{a^2+b^2}+\frac {b^2 \int \frac {(e+f x) \cosh (c+d x)}{a+b \sinh (c+d x)} \, dx}{a^2+b^2} \\ & = -\frac {b (e+f x)^2}{2 \left (a^2+b^2\right ) f}+\frac {\int (a (e+f x) \text {sech}(c+d x)-b (e+f x) \tanh (c+d x)) \, dx}{a^2+b^2}+\frac {b^2 \int \frac {e^{c+d x} (e+f x)}{a-\sqrt {a^2+b^2}+b e^{c+d x}} \, dx}{a^2+b^2}+\frac {b^2 \int \frac {e^{c+d x} (e+f x)}{a+\sqrt {a^2+b^2}+b e^{c+d x}} \, dx}{a^2+b^2} \\ & = -\frac {b (e+f x)^2}{2 \left (a^2+b^2\right ) f}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {a \int (e+f x) \text {sech}(c+d x) \, dx}{a^2+b^2}-\frac {b \int (e+f x) \tanh (c+d x) \, dx}{a^2+b^2}-\frac {(b f) \int \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right ) \, dx}{\left (a^2+b^2\right ) d}-\frac {(b f) \int \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right ) \, dx}{\left (a^2+b^2\right ) d} \\ & = \frac {2 a (e+f x) \arctan \left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {(2 b) \int \frac {e^{2 (c+d x)} (e+f x)}{1+e^{2 (c+d x)}} \, dx}{a^2+b^2}-\frac {(b f) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a-\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}-\frac {(b f) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}-\frac {(i a f) \int \log \left (1-i e^{c+d x}\right ) \, dx}{\left (a^2+b^2\right ) d}+\frac {(i a f) \int \log \left (1+i e^{c+d x}\right ) \, dx}{\left (a^2+b^2\right ) d} \\ & = \frac {2 a (e+f x) \arctan \left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}-\frac {(i a f) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {(i a f) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {(b f) \int \log \left (1+e^{2 (c+d x)}\right ) \, dx}{\left (a^2+b^2\right ) d} \\ & = \frac {2 a (e+f x) \arctan \left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {i a f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {i a f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {(b f) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2} \\ & = \frac {2 a (e+f x) \arctan \left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {i a f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {i a f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}-\frac {b f \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2} \\ \end{align*}
Time = 2.79 (sec) , antiderivative size = 520, normalized size of antiderivative = 1.56 \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {4 a d e \arctan \left (e^{c+d x}\right )-4 a c f \arctan \left (e^{c+d x}\right )+\frac {4 a b \sqrt {a^2+b^2} d e \arctan \left (\frac {a+b e^{c+d x}}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-\left (a^2+b^2\right )^2}}-\frac {4 a b \sqrt {-\left (a^2+b^2\right )^2} d e \text {arctanh}\left (\frac {a+b e^{c+d x}}{\sqrt {a^2+b^2}}\right )}{\left (-a^2-b^2\right )^{3/2}}+2 i a f (c+d x) \log \left (1-i e^{c+d x}\right )-2 i a f (c+d x) \log \left (1+i e^{c+d x}\right )+2 b f (c+d x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )+2 b f (c+d x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )-2 b d e \log \left (1+e^{2 (c+d x)}\right )+2 b c f \log \left (1+e^{2 (c+d x)}\right )-2 b f (c+d x) \log \left (1+e^{2 (c+d x)}\right )-2 b c f \log \left (b-2 a e^{c+d x}-b e^{2 (c+d x)}\right )+2 b d e \log \left (2 a e^{c+d x}+b \left (-1+e^{2 (c+d x)}\right )\right )-2 i a f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )+2 i a f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )+2 b f \operatorname {PolyLog}\left (2,\frac {b e^{c+d x}}{-a+\sqrt {a^2+b^2}}\right )+2 b f \operatorname {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )-b f \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 953 vs. \(2 (313 ) = 626\).
Time = 3.25 (sec) , antiderivative size = 954, normalized size of antiderivative = 2.86
method | result | size |
risch | \(-\frac {2 e b \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {4 e a \arctan \left ({\mathrm e}^{d x +c}\right )}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 e b \ln \left (b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}-b \right )}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \operatorname {dilog}\left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \operatorname {dilog}\left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1+i {\mathrm e}^{d x +c}\right ) b x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1+i {\mathrm e}^{d x +c}\right ) b c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 i f \operatorname {dilog}\left (1+i {\mathrm e}^{d x +c}\right ) a}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) a c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1-i {\mathrm e}^{d x +c}\right ) b x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1-i {\mathrm e}^{d x +c}\right ) b c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) a c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) a x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \operatorname {dilog}\left (1+i {\mathrm e}^{d x +c}\right ) b}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) a x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \operatorname {dilog}\left (1-i {\mathrm e}^{d x +c}\right ) b}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 i f \operatorname {dilog}\left (1-i {\mathrm e}^{d x +c}\right ) a}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 c f b \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {4 c f a \arctan \left ({\mathrm e}^{d x +c}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 c f b \ln \left (b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}-b \right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}\) | \(954\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 588, normalized size of antiderivative = 1.76 \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {b f {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + b f {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + {\left (i \, a f - b f\right )} {\rm Li}_2\left (i \, \cosh \left (d x + c\right ) + i \, \sinh \left (d x + c\right )\right ) + {\left (-i \, a f - b f\right )} {\rm Li}_2\left (-i \, \cosh \left (d x + c\right ) - i \, \sinh \left (d x + c\right )\right ) + {\left (b d e - b c f\right )} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) + 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) + {\left (b d e - b c f\right )} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) - 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) + {\left (b d f x + b c f\right )} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + {\left (b d f x + b c f\right )} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + {\left (i \, a d e - b d e - i \, a c f + b c f\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + i\right ) + {\left (-i \, a d e - b d e + i \, a c f + b c f\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - i\right ) + {\left (-i \, a d f x - b d f x - i \, a c f - b c f\right )} \log \left (i \, \cosh \left (d x + c\right ) + i \, \sinh \left (d x + c\right ) + 1\right ) + {\left (i \, a d f x - b d f x + i \, a c f - b c f\right )} \log \left (-i \, \cosh \left (d x + c\right ) - i \, \sinh \left (d x + c\right ) + 1\right )}{{\left (a^{2} + b^{2}\right )} d^{2}} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\int \frac {\left (e + f x\right ) \operatorname {sech}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {sech}\left (d x + c\right )}{b \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {sech}\left (d x + c\right )}{b \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx=\int \frac {e+f\,x}{\mathrm {cosh}\left (c+d\,x\right )\,\left (a+b\,\mathrm {sinh}\left (c+d\,x\right )\right )} \,d x \]
[In]
[Out]